home *** CD-ROM | disk | FTP | other *** search
/ Merciful 2 / Merciful - Disc 2.iso / software / h / hypercacheii.dms / hypercacheii.adf / ARexx / Stats.rexx < prev    next >
OS/2 REXX Batch file  |  1994-07-29  |  714b  |  31 lines

  1. /*
  2.  * Ask HyperCache for information about how it is performing, and
  3.  * display a summary of this.
  4.  */
  5.  
  6. Address 'HyperCache.scsi.device.0'
  7.  
  8. options results
  9.  
  10. Stats
  11. statistics=result
  12.  
  13. parse var statistics ReadHits ReadMisses WriteHits WriteMisses
  14.  
  15. TotalReads=ReadHits+ReadMisses
  16. TotalWrites=WriteHits+WriteMisses
  17.  
  18. say "Read Hits="ReadHits" Read Misses="ReadMisses" Total Reads="TotalReads
  19. if (TotalReads~=0) then
  20.     say "  Read hit ratio="ReadHits/TotalReads*100"%"
  21. else
  22.     say "  Read hit ratio=undefined"
  23. say ""
  24.  
  25. say "Write Hits="WriteHits" Write Misses="WriteMisses" Total Writes="TotalWrites
  26. if TotalWrites~=0 then
  27.     say "  Write hit ratio="WriteHits/TotalWrites*100"%"
  28. else
  29.     say "  Write hit ratio=undefined"
  30. say ""
  31.